/*
    卡片
 */
public class test14 {
    public static void main(String[] args) {
        int count = 0;
        for(int i = 1 ; i <= 20210 ; i++){
            int a = i;
            while(a!=0){
                if(a%10==1) count++;
                a=a/10;
                if (count == 2021) {
                    System.out.println(i);
                    break;
                }
            }
        }
    }
}
